Power of a number in Python